--[[
MelonScript
Networking
--]]

require( "datastream" )

usermessage.Hook( "SendChatText", function( um )
	local amt = um:ReadShort()
	local build = { }
	local colour = true
	for i = 1, amt do
		if ( colour ) then
			local vec = um:ReadVector()
			local col = Color( vec.x, vec.y, vec.z, 255 )
			table.insert( build, col )
		else
			local str = um:ReadString()
			table.insert( build, str )
		end
		colour = !colour
	end
	chat.AddText( unpack( build ) )
end )